package com.example.a10.util;

public class optionJsonUtil {

    public static String getOptionJson(int[] arr){
        String json = "{\n" +
                "  \"title\": {\n" +
                "    \"text\": \"\",\n" +
                "    \"left\": \"center\"\n" +
                "  },\n" +
                "  \"legend\": {\n" +
                "    \"orient\": \"vertical\",\n" +
                "    \"left\": \"left\",\n" +
                "    \"data\": [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\"]\n" +
                "  },\n" +
                "  \"tooltip\": {\n" +
                "    \"trigger\": \"item\",\n" +
                "    \"formatter\": \"{a} <br/>{b}: {c} ({d}%)\"\n" +
                "  },\n" +
                "  \"series\": [\n" +
                "    {\n" +
                "      \"name\": \"分类数据\",\n" +
                "      \"type\": \"pie\",\n" +
                "      \"radius\": [50, 110],\n" +
                "      \"label\": {\n" +
                "        \"show\": true,\n" +
                "        \"position\": \"outside\"\n" +
                "      },\n" +
                "      \"data\": [\n" +
                "        {\"value\": "+arr[0]+", \"name\": \"0\"},\n" +
                "        {\"value\": "+arr[1]+", \"name\": \"1\"},\n" +
                "        {\"value\": "+arr[2]+", \"name\": \"2\"},\n" +
                "        {\"value\": "+arr[3]+", \"name\": \"3\"},\n" +
                "        {\"value\": "+arr[4]+", \"name\": \"4\"},\n" +
                "        {\"value\": "+arr[5]+", \"name\": \"5\"}\n" +
                "      ]\n" +
                "    }\n" +
                "  ]\n" +
                "}\n";


                return json;
    }

}
